import { Ref } from "vue"


const useActionFun = (commonListRef: Ref<Recordable | null>)=>{

  const afterGetActions = (actions: Recordable[]) => {
    return actions??[]
  }


  const actionFun = {
    action_1: async ()=>{
      console.log("action_1")
      commonListRef.value?.refresh()
    },
    action_2: async ()=>{
      console.log("action_2")
      commonListRef.value?.refresh()
    }
  }


  return {
    afterGetActions,
    actionFun
  }
  
}

export default useActionFun